<?php
/**
 *  view: profile
 *  file: profile.php
 */
//$user_name = ( $user->name!="" )?$user->name:$user->username;
$user_name = $user->username;
?>

  <div id="f_main">
 	<div class="f_container">
    
    <h3>
      <?php
      if( true == $user->is_online)
        echo "<span class='online' title='Online'></span>";
      else
        echo "<span class='offline' title='Offline'></span>";
      ?>
      <?php echo $user_name; ?> (<?php echo $user->age; ?>)
    </h3>
    <div class="block-left">
        <?php if( NULL != $main_image ){ ?>
    	<img class="profil" src="<?php echo base_url(); ?>profile/image/small/<?php echo $user->id .'/'. $main_image; ?>" alt="<?php echo $user_name; ?>" />
        <?php } else { ?>
        <img class="profil" src="<?php echo base_url(); ?>img/no_image.gif" alt="" />
        <?php } ?>
        <p><a class="link-edit" href="<?php echo base_url(); ?>profile/edit-photo.htm"><?php echo lang('edit_profile_picture'); ?></a></p>
        <div class="baloon"></div>
        <div class="about-me">
        <p><span><?php echo lang('flirtyy_profile_text'); ?> </span><?php echo $user->flirt_text; ?></p>
        </div>
    </div><!--end block-left-->
    <div class="block">
    	<h4>
            <?php echo lang('basic_information'); ?>            
            <span><a class="link-edit" href="<?php echo base_url();?>profile/edit-profile.htm"><?php echo lang('edit_profile'); ?></a></span>
        </h4>
        
        <div id="response"></div><!-- Show  errors -->
        <div class="clr"></div>
      
        <div class="profil-location">
        <img src="<?php echo base_url(); ?>img/template/map-profile.png" width="101" height="75" alt="map" />
        <p><?php echo lang($user->location); ?><br />
        <span><em><?php echo $user->zip_code; ?></em></span>
        </p>
        
        <div class="search-region">
          <form action="<?php echo base_url(); ?>search.htm" method="post" id="form-zip-code" >
            <input type="hidden" id="zip_code" name="filter[postal_code]" value="<?php echo substr($user->zip_code, 0, 1) ; ?>" />
            <a href="javascript: void(null)" id='zip-code-search'><img src="<?php echo base_url(); ?>img/template/search-btn.png" width="23" height="24" alt="search" ><?php echo lang('find_people_from_region'); ?></a>
          </form>       
        
        </div>
        
        <div class="clr"></div>
        
        </div><!--profil-location-->
        <div class="clr"></div>
        <div class="profil-info">
        	<p><span><?php echo lang('age'); ?>: </span><?php echo $user->age; ?></p>
            <p><span><?php echo lang('gender'); ?>: </span><?php echo lang($user->gender); ?></p>
            <!--<p><span><?php echo lang('status'); ?>: </span>Solo</p> -->
            <p><span><?php echo lang('profile_looking_for'); ?>: </span><?php echo lang($user->look_for); ?></p>
            <p><span><?php echo lang('your_credit'); ?>: </span> <?php echo $user->coins ." ". lang('coins'); ?></p>
            <?php if( $user->have_promo_code ){ ?>
            <p> <span><a href='<?php echo base_url(); ?>profile/promo-code.htm'><?php echo lang('use_promo_code'); ?> </a> </span> </p>
            <?php } ?>
        </div><!--end profil-info-->
        
        
        
        
        <h4><?php echo lang('photo_gallery'); ?><span><a class="link-edit" href="<?php echo base_url(); ?>profile/edit-photo.htm"><?php echo lang('view_edit_photo'); ?></a></span></h4>
              
          <?php $this->load->view('profile/part/gallery_items'); ?>
               
    </div><!--end block-->
    <div class="block-right">
    	<div class="side-module">
        
              <?php $this->load->view('modules/my_favorites'); ?>
          
        </div><!--End side-module-->
        <div class="basic-module">
          
              <?php $this->load->view('modules/whos_viewed_your_profile');  ?>
          
        </div><!--End basic-module-->
        <div class="side-module">
          
              <?php $this->load->view('modules/my_friends');  ?>
          
        </div><!--End side-module-->
    </div><!--end block-right-->
    </div><!--end f_container-->
 </div><!--end f_main-->



